import request from '@/utils/request'

const api = {
  get_user_kpi: '/kpi_main/get_user_kpi',
  get_tagop: '/kpi_config/get_tagop',
  get_taginv: '/kpi_config/get_taginv',
  get_kpi_dinge: '/kpi_config/get_kpi_dinge',
  getInvTagUrl: '/kpi_config/get_invtag',
  oaZhuceUrl: '/kaoqin/oa_zhuce',
  resetDeviceInfoUrl: '/kaoqin/reset_device_info',
}
export async function resetDeviceInfoApi(params) {
  const res = await request({
    url: api.resetDeviceInfoUrl,
    method: 'get',
    params,
  })
  return res
}

export async function oaZhuceApi(params) {
  const res = await request({
    url: api.oaZhuceUrl,
    method: 'get',
    params,
  })
  return res
}

export async function getInvTagApi(data) {
  const res = await request({
    url: api.getInvTagUrl,
    method: 'post',
    data,
  })
  return res
}

export async function getUserKpi(data) {
  const res = await request({
    url: api.get_user_kpi,
    method: 'post',
    data,
  })
  return res
}

export async function getTagop(params) {
  const res = await request({
    url: api.get_tagop,
    method: 'get',
    params,
  })
  return res
}

export async function getTaginv(params) {
  const res = await request({
    url: api.get_taginv,
    method: 'get',
    params,
  })
  return res
}

export async function getKpiDinge(data) {
  const res = await request({
    url: api.get_kpi_dinge,
    method: 'post',
    data,
  })
  return res
}
